<?php
/*
+--------------------------------------------------------------------------
|   Anwsion [#RELEASE_VERSION#]
|   ========================================
|   by Tatfook Network Team
|   (c) 2011 - 2012 Anwsion Software
|   http://www.anwsion.com
|   ========================================
|   Support: zhengqiang@gmail.com
|   
+---------------------------------------------------------------------------
*/

class c_main_class extends AWS_CONTROLLER
{
	public function get_access_rule()
	{
		$rule_action["rule_type"] = "white"; //黑名单,黑名单中的检查  'white'白名单,白名单以外的检查
		$rule_action["actions"] = array();
		return $rule_action;
	}

	public function setup()
	{
		TPL::assign('draft_count', $this->model('draft')->get_draft_count('answer', $this->user_id));
		TPL::assign('question_invite_count', $this->model('question')->get_invite_question_list($this->user_id, '', true));	
	}
	
	public function index_action()
	{
		
		//边栏可能感兴趣的人
		if(TPL::is_output('block/sidebar_recommend_users_topics.tpl.htm','notifications/index'))
		{
			$recommend_users_topics = $this->model('module')->recommend_users_topics($this->user_id);
			TPL::assign('sidebar_recommend_users_topics', $recommend_users_topics);
		}
		
		TPL::assign('recommend_questions', $this->model('question')->get_user_recommend_v2($this->user_id, 10));
		
		$this->crumb('通知', '/notifications');
		
		TPL::import_css('css/discussion.css');
		
		TPL::output('notifications/index');
	}
}